Optimal. Leaf size=58 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d}-\frac {\csc ^2(c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3957, 2785,
2686, 30, 2691, 3855} \begin {gather*} -\frac {\csc ^2(c+d x)}{2 a d}-\frac {\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2686
Rule 2691
Rule 2785
Rule 3855
Rule 3957
Rubi steps
\begin {align*} \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx &=-\int \frac {\cot (c+d x)}{-a-a \cos (c+d x)} \, dx\\ &=-\frac {\int \cot ^2(c+d x) \csc (c+d x) \, dx}{a}+\frac {\int \cot (c+d x) \csc ^2(c+d x) \, dx}{a}\\ &=\frac {\cot (c+d x) \csc (c+d x)}{2 a d}+\frac {\int \csc (c+d x) \, dx}{2 a}-\frac {\text {Subst}(\int x \, dx,x,\csc (c+d x))}{a d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d}-\frac {\csc ^2(c+d x)}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 67, normalized size = 1.16 \begin {gather*} -\frac {\left (1+2 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sec (c+d x)}{2 a d (1+\sec (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 43, normalized size = 0.74
method | result | size |
norman | \(-\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}\) | \(39\) |
derivativedivides | \(\frac {\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{4}-\frac {1}{2 \left (1+\cos \left (d x +c \right )\right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{4}}{d a}\) | \(43\) |
default | \(\frac {\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{4}-\frac {1}{2 \left (1+\cos \left (d x +c \right )\right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{4}}{d a}\) | \(43\) |
risch | \(-\frac {{\mathrm e}^{i \left (d x +c \right )}}{a d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 a d}\) | \(72\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 47, normalized size = 0.81 \begin {gather*} -\frac {\frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a} - \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a} + \frac {2}{a \cos \left (d x + c\right ) + a}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.22, size = 60, normalized size = 1.03 \begin {gather*} -\frac {{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2}{4 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 56, normalized size = 0.97 \begin {gather*} \frac {\frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} + \frac {\cos \left (d x + c\right ) - 1}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.92, size = 33, normalized size = 0.57 \begin {gather*} -\frac {1}{2\,d\,\left (a+a\,\cos \left (c+d\,x\right )\right )}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{2\,a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________